<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="upload-button" >点击上传</button>
    <input type="file" placeholder="" title="上传小于5M的文件" class="upload-input">

    <script>
        const uploadButton = document.querySelector('#upload-button');
        const uploadInput = document.querySelector('.upload-input');
        uploadButton.addEventListener('click',(e) => {
            console.log('----');
            uploadInput.click();

        })
    </script>
</body>
</html>